package com.weigang.hello.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weigang.hello.entity.HrUserEntity;
import com.weigang.hello.mapper.HrUserMapper;
import com.weigang.hello.service.HrUserService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HrUserServiceImpl extends ServiceImpl<HrUserMapper, HrUserEntity> implements HrUserService {


    @Override
    public List<HrUserEntity> getUsers() {
        return baseMapper.selectAllUser();
    }

    @Override
    public List<HrUserEntity> getPageUsers(Integer pageNo,Integer pageSize) {
        Page<HrUserEntity> page = new Page<>(pageNo,pageSize);
        return baseMapper.getPageUsers(page);
    }
}
